><

Adding browser switch scripts



You can add a browser switch script to the head section of your Web page that detects the Web browser loading the page and automatically redirects viewers to an alternate page based on their browser. For example, you can use this feature to have version 3.0 browsers switch to another page if the current page contains features (such as actions, animations, and cascading style sheets) that can only be interpreted by version 4.0 browsers and higher.

Note: The browser switch script is ignored by version 2.0 browsers and Microsoft Internet Explorer 3.01 for Mac OS.

To add a browser switch script:

1 Click the triangle () next to the Page icon () in the upper left corner of the document window to open the head section pane of your document window.

2 Choose Window > Objects.

3 In the Objects palette, click the Smart tab ().

4 Drag the Browser Switch icon from the Objects palette to the head section pane.


5 Choose Window > Inspector.

6 In the Browser Switch Inspector, select the browsers that support the features on your page:

  • Select Auto to have Adobe GoLive determine browser compatibility. For example, if your page contains features that can only be interpreted by version 4.0 browsers and higher, Adobe GoLive configures the script to reroute requests from version 3.0 browsers.
  • If the same browsers are supported in Windows and Mac OS, deselect Auto, choose All from the Platform menu, and select the supported browsers.
  • If different browsers are supported in Windows and Mac OS, choose Windows from the Platform menu and select the supported browsers for Windows. Then choose Mac OS from the Platform menu, and select the supported browsers for Mac OS.

  • Note: In the Browser Switch Inspector, you can select the infinity symbol for Netscape or Explorer to indicate that the supported browser versions are those higher than version 5.0.

    7 Select an alternate page using the Point and Shoot button (), or the Browse button.

    In the alternate page, make sure that you include a browser incompatibility message, such as "Please download a newer browser version to view the original page."

    8 When you have finished, try viewing your page with an incompatible browser and check whether the request is correctly rerouted.


    Setting Up Pages > Adding browser switch scripts